﻿<%@ Control Language="C#" ClassName="PrescriptionDetailFields" %>

<asp:FormView ID="FormView1" runat="server">
	<ItemTemplate>
		<table border="0" cellpadding="3" cellspacing="1">
			<tr>
        <td class="literal"><asp:Label ID="lbldataCostPrice" runat="server" Text="Cost Price:" AssociatedControlID="dataCostPrice" /></td>
        <td>
					<asp:TextBox runat="server" ID="dataCostPrice" Text='<%# Bind("CostPrice") %>'></asp:TextBox><asp:RequiredFieldValidator ID="ReqVal_dataCostPrice" runat="server" Display="Dynamic" ControlToValidate="dataCostPrice" ErrorMessage="Required"></asp:RequiredFieldValidator><asp:RangeValidator ID="RangeVal_dataCostPrice" runat="server" Display="Dynamic" ControlToValidate="dataCostPrice" ErrorMessage="Invalid value" MaximumValue="999999999" MinimumValue="-999999999" Type="Double"></asp:RangeValidator>
				</td>
			</tr>
			<tr>
        <td class="literal"><asp:Label ID="lbldataPrescriptionId" runat="server" Text="Prescription Id:" AssociatedControlID="dataPrescriptionId" /></td>
        <td>
					<data:EntityDropDownList runat="server" ID="dataPrescriptionId" DataSourceID="PrescriptionIdPrescriptionDataSource" DataTextField="PatientCode" DataValueField="PrescriptionId" SelectedValue='<%# Bind("PrescriptionId") %>' AppendNullItem="true" Required="true" NullItemText="< Please Choose ...>" ErrorText="Required" />
					<data:PrescriptionDataSource ID="PrescriptionIdPrescriptionDataSource" runat="server" SelectMethod="GetAll"  />
				</td>
			</tr>
			<tr>
        <td class="literal"><asp:Label ID="lbldataDrugId" runat="server" Text="Drug Id:" AssociatedControlID="dataDrugId" /></td>
        <td>
					<data:EntityDropDownList runat="server" ID="dataDrugId" DataSourceID="DrugIdDrugDispoDataSource" DataTextField="DrugName" DataValueField="DrugId" SelectedValue='<%# Bind("DrugId") %>' AppendNullItem="true" Required="true" NullItemText="< Please Choose ...>" ErrorText="Required" />
					<data:DrugDispoDataSource ID="DrugIdDrugDispoDataSource" runat="server" SelectMethod="GetAll"  />
				</td>
			</tr>
			<tr>
        <td class="literal"><asp:Label ID="lbldataDrugName" runat="server" Text="Drug Name:" AssociatedControlID="dataDrugName" /></td>
        <td>
					<asp:TextBox runat="server" ID="dataDrugName" Text='<%# Bind("DrugName") %>' MaxLength="50"></asp:TextBox><asp:RequiredFieldValidator ID="ReqVal_dataDrugName" runat="server" Display="Dynamic" ControlToValidate="dataDrugName" ErrorMessage="Required"></asp:RequiredFieldValidator>
				</td>
			</tr>
			<tr>
        <td class="literal"><asp:Label ID="lbldataUnit" runat="server" Text="Unit:" AssociatedControlID="dataUnit" /></td>
        <td>
					<asp:TextBox runat="server" ID="dataUnit" Text='<%# Bind("Unit") %>' MaxLength="50"></asp:TextBox><asp:RequiredFieldValidator ID="ReqVal_dataUnit" runat="server" Display="Dynamic" ControlToValidate="dataUnit" ErrorMessage="Required"></asp:RequiredFieldValidator>
				</td>
			</tr>
			<tr>
        <td class="literal"><asp:Label ID="lbldataQuantity" runat="server" Text="Quantity:" AssociatedControlID="dataQuantity" /></td>
        <td>
					<asp:TextBox runat="server" ID="dataQuantity" Text='<%# Bind("Quantity") %>'></asp:TextBox><asp:RequiredFieldValidator ID="ReqVal_dataQuantity" runat="server" Display="Dynamic" ControlToValidate="dataQuantity" ErrorMessage="Required"></asp:RequiredFieldValidator><asp:RangeValidator ID="RangeVal_dataQuantity" runat="server" Display="Dynamic" ControlToValidate="dataQuantity" ErrorMessage="Invalid value" MaximumValue="2147483647" MinimumValue="-2147483648" Type="Integer"></asp:RangeValidator>
				</td>
			</tr>
			<tr>
        <td class="literal"><asp:Label ID="lbldataUnitPrice" runat="server" Text="Unit Price:" AssociatedControlID="dataUnitPrice" /></td>
        <td>
					<asp:TextBox runat="server" ID="dataUnitPrice" Text='<%# Bind("UnitPrice") %>'></asp:TextBox><asp:RequiredFieldValidator ID="ReqVal_dataUnitPrice" runat="server" Display="Dynamic" ControlToValidate="dataUnitPrice" ErrorMessage="Required"></asp:RequiredFieldValidator><asp:RangeValidator ID="RangeVal_dataUnitPrice" runat="server" Display="Dynamic" ControlToValidate="dataUnitPrice" ErrorMessage="Invalid value" MaximumValue="999999999" MinimumValue="-999999999" Type="Double"></asp:RangeValidator>
				</td>
			</tr>
			<tr>
        <td class="literal"><asp:Label ID="lbldataExpDate" runat="server" Text="Exp Date:" AssociatedControlID="dataExpDate" /></td>
        <td>
					<asp:TextBox runat="server" ID="dataExpDate" Text='<%# Bind("ExpDate", "{0:dd-MMM-yyyy}") %>' MaxLength="10"></asp:TextBox><asp:ImageButton ID="cal_dataExpDate" runat="server" SkinID="CalendarImageButton" OnClientClick="javascript:showCalendarControl(this.previousSibling);return false;" /><asp:RequiredFieldValidator ID="ReqVal_dataExpDate" runat="server" Display="Dynamic" ControlToValidate="dataExpDate" ErrorMessage="Required"></asp:RequiredFieldValidator>
				</td>
			</tr>
			<tr>
        <td class="literal"><asp:Label ID="lbldataBatchLot" runat="server" Text="Batch Lot:" AssociatedControlID="dataBatchLot" /></td>
        <td>
					<asp:TextBox runat="server" ID="dataBatchLot" Text='<%# Bind("BatchLot") %>' MaxLength="20"></asp:TextBox><asp:RequiredFieldValidator ID="ReqVal_dataBatchLot" runat="server" Display="Dynamic" ControlToValidate="dataBatchLot" ErrorMessage="Required"></asp:RequiredFieldValidator>
				</td>
			</tr>
			<tr>
        <td class="literal"><asp:Label ID="lbldataRemark" runat="server" Text="Remark:" AssociatedControlID="dataRemark" /></td>
        <td>
					<asp:TextBox runat="server" ID="dataRemark" Text='<%# Bind("Remark") %>' MaxLength="250"></asp:TextBox>
				</td>
			</tr>
			
		</table>

	</ItemTemplate>
</asp:FormView>


